home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / tbasmhlp.arc / MKINLINE.DOC next >
Text File  |  1987-07-27  |  2KB  |  78 lines

  1.  
  2.                 MKINLINE.EXE
  3.                 by Matthew Dornquast
  4.  
  5. (Source is included for your amusement. Sell it, give it away, make a million,
  6.  trash your hard disk, etc. I don't care. It's yours.)
  7.  
  8.     MKINLINE Takes a text file produced by debug's (U)nasemble option with
  9. file redirection '>' and creates a nice little .BAS inline procedure for use
  10. with turbo basic. When MKINLINE.EXE is included in your asemble batch file, it
  11. can make life alot easier when developing assembly language routines for use
  12. with your TURBO BASIC program.
  13.  
  14. I. [Creating a input file for use with MKINLINE] is done by unassembling a
  15.     .COM file with debug while redirecting debugs output to the input file.
  16.  
  17.    Example: Enter> DEBUG MYPROG.COM >MYPROG.TXT
  18.        Then Enter> U<Enter> (This causes debug to unassemble your code.)
  19.        Then Enter> Q<Enter> (Exit debug)
  20.  
  21.    Now MYPROG.TXT contains Unassembled the source code to MYPROG.COM. Please
  22.    note that you may have to type U<enter> many times before your com file
  23.    is completely unassembled.
  24.  
  25. II. [Creating a source file for $INCLUDE to your Turbo Basic program] is done
  26.    by running MKINLINE. Simply enter the source filename on the command line.
  27.    The output filename will be the same with the extension changed/added to
  28.    .BAS.
  29.  
  30. III. [Using created routine in Turbo Basic] is accomplished by the $include
  31.     metacommand.
  32.  
  33. [NOTE!] MKINLINE finds the end of your assembly language routine by either
  34. a EOF mark [OR] the first POP BP instruction. Since any normal .ASM routine
  35. designed to interface Turbo Basic would end this way, it is a handy way to
  36. describe the end-of-source.
  37.  
  38.  
  39. [Sample batch file that automates creating of INLINE.BAS file]
  40. [Assumes path has been set to your MSDOS directory and your assembler is]
  41. [in directory \MASM]
  42. echo off
  43. rem
  44. rem assemble source code.
  45. rem
  46. \masm\masm %1;
  47.  
  48. rem
  49. rem ask if he wants to make inline file (Maybe there were assemly errors so
  50. rem this would be out of the questions)
  51. rem
  52. yorn Want to build a INLINE file
  53. if errorlevel=1 goto end
  54.  
  55. rem
  56. rem They said yes, so get to it.
  57. rem
  58. link %1.obj;
  59. exe2bin %1.exe %1.com
  60. erase %1.exe
  61. erase %1.obj
  62. debug %1.com <debugin.txt >%1.lst
  63. mkinline %1.lst
  64. erase %1.lst
  65. rem
  66. rem Move the source file created to their library of routines.
  67. rem
  68. copy %1.bas \tb\library >nul
  69. erase %1.bas
  70. erase %1.com
  71. :end
  72.  
  73. [Sample input file for automation of DEBUG]
  74. FILENAME:DEBUGIN.TXT
  75. U<CR>U<CR>U<CR>U<CR>U<CR>U<CR>E<CR><EOF>
  76.  
  77.  
  78.